
<h3 align="center">ionic教程</h3>
## 项目配置

``` objective-c
#define PublicPath [[NSBundle mainBundle] URLForResource:@"public" withExtension:nil]
#define CAPConfiguration [[NSBundle mainBundle] URLForResource:@"capacitor.config" withExtension:@"json"]
#define CDVConfiguration [[NSBundle mainBundle] URLForResource:@"config" withExtension:@"xml"]

```

## 组件

* [ion-content](https://ionicframework.com/docs/api/content)
* [ion-badge](https://ionicframework.com/docs/api/badge)


## 路由

@ionic/react-router 
 * [ion-tabs](https://ionicframework.com/docs/api/tabs)

## 参考资料

 * [ionic教程](https://ionic.nodejs.cn/)
 * [cap本地实现](https://capacitorjs.com/docs/ios)
 * [github](https://github.com/ionic-team/capacitor)

## redux
``` javascript
// sessions.reducer.ts
    case 'add-favorite': {
      return { ...state, favorites: [...(state.favorites), action.sessionId] };
    }

// sessions.actions.ts
export const addFavorite = (sessionId: number) => ({
  type: 'add-favorite',
  sessionId
} as const);


// SessionList.ts
import { addFavorite, removeFavorite } from '../data/sessions/sessions.actions';
export default connect<OwnProps, StateProps, DispatchProps>({
  mapStateToProps: (state) => ({
    favoriteSessions: state.data.favorites
  }),
  mapDispatchToProps: ({
    addFavorite,
    removeFavorite
  }),
  component: SessionList
});
```